<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
   var report = (function () {
       var imgs = [];
       return function (src) {
           var img = new Image();
           imgs.push(img);
           img.src=src;
       }
   })();

   const name = "user";

   // 利用函数的作用域来封装函数返回一个函数,就叫做高级函数
    report('http://baidu.com/?jdjdj="swsw"&&sw="sw"')
</script>
</body>
</html>